"use strict";
import * as React from 'react';
import { autoSize, commonStyles } from "../assets/styles/common";
import Colors from "../assets/styles/Colors";
import Avatar from "./Avatar";
import MyText from "./MyText";
import Request from "../utils/Request";
const { View, Text } = require('react-native');
const { connect } = require('react-redux');
class ContactUser extends React.Component {
    render() {
        let info = '';
        if (this.props.user.duty) {
            info += this.props.user.duty + 'at ';
        }
        if (this.props.user.company) {
            info += this.props.user.company.name;
        }
        return (<View style={[commonStyles.flexRow, { padding: autoSize(15), alignItems: 'center', height: autoSize(95),
                backgroundColor: Colors.Background
            }]}>
                <Avatar size={autoSize(65)} source={{ uri: Request.checkImageUrl(this.props.user.avatar) }}/>
                <View style={[commonStyles.flexColumn, { justifyContent: 'space-around', marginLeft: 15 }]}>
                    <MyText color={Colors.Title} fontSize={15}>{this.props.user.nickName}</MyText>
                    <MyText color={Colors.Title} fontSize={12}>{info}</MyText>
                    
                </View>
            </View>);
    }
}
export default ContactUser;
